import request from '@/utils/request'

// 查询商机列表
export function listOpportunity(query) {
  return request({
    url: '/opportunity/teamList',
    method: 'get',
    params: query
  })
}

// 查询商机详细
export function getOpportunityInfo(id) {
  return request({
    url: '/opportunity/getDetails/' + id,
    method: 'get'
  })
}
// 部门商机分配接口
export function teamAllocation(query) {
  return request({
    url: '/opportunity/teamAllocation/',
    method: 'put',
    params: query
  })
}
// 部门商机领取接口
export function teamReceive(query) {
  return request({
    url: '/opportunity/teamReceive/',
    method: 'put',
    params: query
  })
}
//获取自己和同部门的用户信息
export function getUserListData(query) {
  return request({
    url: '/system/user/listData',
    method: 'get',
    params: query
  })
}
